<?php
/**
 * Created by PhpStorm.
 * User: serenehaly
 * Date: 2018/2/6
 * Time: 15:38
 */

namespace app\api\controller\v1;


use app\api\service\UserToken;

class Token
{
    public function getToken($code = '')
    {
        $validate = new \app\api\validate\Token();
        $validate->goCheck();
        $ut = new UserToken($code);
        $token = $ut->get();
        return [
            'token' => $token
        ];
    }

    public function test()
    {
        $result = json_decode(cache('10863212438c216e78ffee658a4ad311'));
        return $result;
    }
}